]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
network-agent: Allow entries to activate default action
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 15 Sep 2011 08:51:53 +0000 (10:51 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 19 Sep 2011 19:26:32 +0000 (21:26 +0200)
Currently entries' 'activate' signal is ignored, so hitting enter
does not have any effect, even if all required information has been
entered.
Instead, connect to the 'activate' signal so that hitting enter
behaves as if the "OK" button had been pressed.

https://bugzilla.gnome.org/show_bug.cgi?id=659133

js/ui/networkAgent.js

index 43fd9a14e3d2336ce1531c33d614132aa7f81e9a..fad9cd11e4495f69f89cb0ea31b71b8461903e81 100644 (file)
@@ -115,6 +115,7 @@ NetworkSecretDialog.prototype = {
                     initialFocusSet = true;
                 }
 
+                secret.entry.clutter_text.connect('activate', Lang.bind(this, this._onOk));
                 secret.entry.clutter_text.connect('text-changed', Lang.bind(this, function() {
                     secret.value = secret.entry.get_text();
                     if (secret.validate)